/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.click.app.service.impl;

import com.click.app.dao.CutDetailDao;
import com.click.app.model.CutDetail;
import com.click.app.model.CutProcess;
import com.click.app.model.Employee;
import com.click.app.service.CutDetailManager;
import java.util.Date;
import java.util.List;

/**
 *
 * @author ariel
 */
public class CutDetailManagerImpl extends GenericManagerImpl<CutDetail, Long> implements CutDetailManager {

    CutDetailDao cutDetailDao;

    public CutDetailManagerImpl(CutDetailDao cutDetailDao) {
        super(cutDetailDao);
        this.cutDetailDao = cutDetailDao;
    }

    public List<CutDetail> findByCutProcess(CutProcess cutProcess) {
        return cutDetailDao.findByCutProcess(cutProcess);
    }
    public List<CutDetail> getAllForModel(){
        return cutDetailDao.getAllForModel();
    }

    public List<CutDetail> findByEmployee(Employee employee) {
        return cutDetailDao.findByEmployee(employee);
    }

    public List<CutDetail> findByEmployeePeriod(Employee employee, Date initDate, Date endDate){
        return cutDetailDao.findByEmployeePeriod(employee,initDate,endDate);
    }

    public List<CutDetail> getByModel(Long idMaterial, Long idModel, Long idModelSize){
        return cutDetailDao.getByModel(idMaterial, idModel, idModelSize);
    }
    public List<CutDetail> findByPantDesign(Long idPantDesign){
        return cutDetailDao.findByPantDesign(idPantDesign);    
    }
    public List<CutDetail> findByPantDesignAndLastDateAndNoCero(Long idPantDesign){
        return cutDetailDao.findByPantDesignAndLastDateAndNoCero(idPantDesign);
    }
    
}
